/**
 * ClassName: dome01
 * Package: PACKAGE_NAME
 * Description:
 *
 * @Author 蒋林康
 * @Create 2023/12/10 12:43
 * @Version 1.0
 */
import java.util.Random;
import java.util.Scanner;
public class dome01 {
    public static void main(String[] args) {
        System.out.println("----------------请输入您猜的数字:-------------------");
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        System.out.println("您输入的数为:"+a);
        int randomNumber = new Random().nextInt(100);
        System.out.println("随机生成的数为:"+randomNumber);
        while (a != randomNumber) {
            if (a < randomNumber) {
                System.out.println("你输入数字小了，请进入下一个循环");
                a = scan.nextInt();				}
            else {
                System.out.println("你输入数字大了，请进入下一个循环");
                a = scan.nextInt();
            }
        }
        System.out.println("你猜对了了!");
    }
}